package com.bdk.middle.orchestration.service;

import com.bdk.middle.common.result.ResultDO;
import com.bdk.middle.orchestration.api.domain.AppManagerDO;
import com.bdk.middle.orchestration.api.query.AppManagerQueryDO;
import com.bdk.middle.orchestration.core.entity.AppManagerEntity;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 *  应用服务类
 * </p>
 *
 * @author Reagan
 * @since 2021-03-12
 */
public interface AppManagerService extends IService<AppManagerEntity> {


    /**
     * 添加应用
     * @param domain 用户DO
     * @return ResultDO
     */
    public ResultDO add(AppManagerDO domain);

    /**
     * 修改应用信息
     * @param domain 用户DO
     * @return ResultDO
     */
    public ResultDO edit(AppManagerDO domain);

    /**
     * 获取应用详情
     * @param id 用户ID
     * @return ResultDO
     */
    public ResultDO get(String id);

    /**
     * 删除应用
     * @param id 用户ID
     * @param modifier 修改人用户名
     * @return ResultDO
     */
    public ResultDO remove(String id, String modifier);

    /**
     * 查找应用列表分页
     * @param domain 查询DO
     * @return ResultDO
     */
    public ResultDO find(AppManagerQueryDO domain);

    /**
     * 改变应用状态
     * @param id
     * @param status
     * @return ResultDO
     */
    public ResultDO updateStatus(String id, int status, String modifier);

    /**
     * 设置应用使用的模块
     * @param domain 查询DO
     * @return ResultDO
     */
    public ResultDO setAppModule(AppManagerDO domain);

    /**
     * 构建应用生成JSON
     * @param id
     * @return ResultDO
     */
    public ResultDO builder(String id);

}
